//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "tools\fn_markerToTrigger.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_trigger","_shape","_marker"];
DEFAULT_PARAM(_marker,0,"");

_shape = [_marker] call FFUNC(toShape);

_trigger = createTrigger["EmptyDetector",(_shape select TMF_SHAPE_CENTER)];
_trigger setTriggerArea[(_shape select TMF_SHAPE_WIDTH), (_shape select TMF_SHAPE_HEIGHT),(_shape select TMF_SHAPE_ANGLE),(_shape select TMF_SHAPE_RECTANGLE)];

TRACE_1("End",_trigger);
TMFPROFILERSTOP;
_trigger;